//
// CTessNearVertex.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CUV;

public class CTessNearVertex extends CTessNodeList {
  private long swigCPtr;

  public CTessNearVertex(long cPtr, boolean cMemoryOwn) {
    super(nel3dJNI.CTessNearVertex_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  public static long getCPtr(CTessNearVertex obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CTessNearVertex(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public void setOwnerBlock(CTessBlock value) {
    nel3dJNI.CTessNearVertex_OwnerBlock_set(swigCPtr, this, CTessBlock.getCPtr(value), value);
  }

  public CTessBlock getOwnerBlock() {
    long cPtr = nel3dJNI.CTessNearVertex_OwnerBlock_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CTessBlock(cPtr, false);
  }

  public void setIndex(int value) {
    nel3dJNI.CTessNearVertex_Index_set(swigCPtr, this, value);
  }

  public int getIndex() {
    return nel3dJNI.CTessNearVertex_Index_get(swigCPtr, this);
  }

  public void setSrc(CTessVertex value) {
    nel3dJNI.CTessNearVertex_Src_set(swigCPtr, this, CTessVertex.getCPtr(value), value);
  }

  public CTessVertex getSrc() {
    long cPtr = nel3dJNI.CTessNearVertex_Src_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CTessVertex(cPtr, false);
  }

  public void setPUv0(CUV value) {
    nel3dJNI.CTessNearVertex_PUv0_set(swigCPtr, this, CUV.getCPtr(value), value);
  }

  public CUV getPUv0() {
    long cPtr = nel3dJNI.CTessNearVertex_PUv0_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CUV(cPtr, false);
  }

  public void setPUv1(CUV value) {
    nel3dJNI.CTessNearVertex_PUv1_set(swigCPtr, this, CUV.getCPtr(value), value);
  }

  public CUV getPUv1() {
    long cPtr = nel3dJNI.CTessNearVertex_PUv1_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CUV(cPtr, false);
  }

  public void setPUv2(CUV value) {
    nel3dJNI.CTessNearVertex_PUv2_set(swigCPtr, this, CUV.getCPtr(value), value);
  }

  public CUV getPUv2() {
    long cPtr = nel3dJNI.CTessNearVertex_PUv2_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CUV(cPtr, false);
  }

  public void initMiddleUv(CTessNearVertex a, CTessNearVertex b) {
    nel3dJNI.CTessNearVertex_initMiddleUv(swigCPtr, this, CTessNearVertex.getCPtr(a), a, CTessNearVertex.getCPtr(b), b);
  }

  public CTessNearVertex() {
    this(nel3dJNI.new_CTessNearVertex(), true);
  }

}
